using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Simnova.Collaborate.Presenter;
using Simnova.Collaborate.View;

public partial class ModifyFeedback : System.Web.UI.Page, IModifyFeedback
{
    private ModifyFeedbackPresenter _modifyFeedbackPresenter;

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        if (Request.QueryString["FeedbackId"] != null)
        {
        }
        else
        {
            _modifyFeedbackPresenter = new ModifyFeedbackPresenter(this, int.Parse(Session["UserId"].ToString()), int.Parse(Request.QueryString["ProductId"].ToString()));
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        _modifyFeedbackPresenter.Save();
        Response.Redirect(@"FeedbackOverview.aspx");
    }

    #region IModifyFeedback Members

    int IModifyFeedback.FeedbackId
    {
        set { FeedbackIdTextBox.Text = value.ToString(); }
    }

    string IModifyFeedback.Title
    {
        get
        {
            return TitleTextBox.Text;
        }
        set
        {
            TitleTextBox.Text = value;
        }
    }

    string IModifyFeedback.Description
    {
        get
        {
            return DescriptionTextBox.Text;
        }
        set
        {
            DescriptionTextBox.Text = value;
        }
    }

    #endregion
}
